package com.learner.ucenter.server;

import com.corundumstudio.socketio.SocketIOServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;


/**
* @author ice2020x
* @Date: 2023/2/26
* @Description: netty服务器启动类
**/
@Component
@Slf4j
public class SocketServerRunner implements CommandLineRunner {

    
    @Autowired
    private SocketIOServer socketIOServer;

    @Override
    public void run(String... args) throws Exception {
        log.info("<----------------服务启动中---------------------->");
        socketIOServer.start();
        log.info("<----------------服务启动成功-------------------->");
    }
}
